DOS Days

Building an MDA/CGA/EGA to VGA Converter

21st February, 2023


Introduction

Over the past few years there have been many occasions where I've wanted to connect an old Hercules, CGA or EGA card to my VGA multisync monitor, but these require a converter - something I've never managed to acquire.

Why not just use a monitor that is compatible, you ask? This would be an option if you have one, but old CRTs that pre-date VGA are getting quite rare, they are often unreliable, and of course they're bulky, requiring lots of storage and desk space so the convenience of being able to use a single monitor for all my retro needs definitely appeals. I do still have my original Philips 12" green screen monitor [which is mentioned in several other articles], a couple of Commodore monitors which are only good for up to 640x200 resolution, a faulty Amstrad ECD (EGA compatible), and my main multisync monitor which is a ViewSonic G70f - five monitors is more than enough!

So it makes perfect sense to have a one-size-fits-all multisync monitor and use a converter to get all the PC graphics standards able to use it.

Sergey's MCE2VGA device would have been an excellent choice, but these have been unavailable for about one and a half years now due to shortages of FPGA chips such as the Altera Cyclone IV the MCE2VGA is based on. I spoke with Sergey, and he's been looking at other options but as of yet, nothing is planned.

Back in mid-2022 I started looking for an alternative, and quickly found one that appeared to fit the bill - the GBS8200 video converter. Sadly, I fell victim to the same false advertising as many when I purchased this board from a popular Chinese retail online store. The GBS8200 was attractively-priced at around 20 EUR, not including tax and shipping.

In this article, we'll explore what this converter board can and cannot do, and my updates to successfully get it working on a retro PC.


The GBS8200 video converter

Note that there are two models of this board: the single VGA output (GBS8200) and the dual VGA output (GBS8220) model. There are also different board revisions (one with black buttons, another with yellow buttons), but for the most part they all have the same specs. I will simply refer to it as the GBS8200 going forward.

What It's Not

Despite the information on the site I bought it from and the board's silkscreen clearly stating that the board is a "CGA/EGA/YUV to VGA" converter, it is *not* compatible with IBM's CGA or EGA standard. Both CGA and EGA output digital video signals and this converter only accepts analogue inputs. Furthermore, CGA and EGA output separate horizontal and vertical sync signals - this board requires a composite* (combined) sync signal.

*Possible correction: The GBS8200 has a separate pin header just behind the 15-pin DSUB input port that supposedly can take RGBHV as an input (Red/Green/Blue plus separate horizontal and vertical sync signals).

 

So what does it work with?

Given the analogue RGBS input the board expects, the GBS8200 can be used out-of-the-box to display video from the following computers onto a suitable monitor.

Platform Output Sync Frequency
Commodore Amiga 23-pin RGB port = analogue RGBS signals on pins 3,4,5 (R,G,B) and 10 (CSYNC) 15 kHz
Atari STE 13-pin DIN 'Monitor' port = analogue RGBS signals on pins 7,6,10 (R,G,B) and 2 (CSYNC). Note that on the ST (not STE), this port's pin 2 carries a composite video output signal, not CSYNC. 15 kHz
SNES* 'Multi-AV' port = analogue RGBS signals on pins 1,2,4 (R,G,B) and 3 (CSYNC). 15 kHz
Sega Megadrive I / Genesis 8-pin DIN = analogue RGB signals on pins 7,3,8 (R,G,B) and 1 (CSYNC). 15 kHz
Sega Megadrive II / Genesis 9-pin mini-DIN = analogue RGBs signals on pins 7,3,1 (R,G,B) and 5 (CSYNC). 15 kHz
Sega Saturn 10-pin mini-DIN sends out analogue RGB signals on pins 5,6,7 (R,G,B) and 1 (CSYNC). 15 kHz
Arcade boards / JAMMA Varies 15 kHz
* Some models only. SNES Mini and others may not output RGBS
In all cases, I recommend you do your own research before connecting any system to a GBS8200, as there are some important details you must to know for each. Never blindly connect these to your GBS8200 without checking your original system's manual and be sure to use the correct cable. You do so at your own risk!


I have many of the above systems, so in its stock form the GBS8200 is actually far from a bad purchasing decision. It shouldn't come as a surprise that other reviews online reveal that it's not able to compete with pricier offerings like the OSSC (Open Source Scan Converter) and RetroTink, with the GBS8200 having a poorer quality output and worse latency, but at this price point it would be wrong to reject it off-hand if your plan is to use it with these consoles and home computers.

Horizontal Frequency Considerations

Another important consideration is the frequency range of the input signal you are connecting to the GBS8200. The GBS8200 has the ability to auto-scan for an analogue input signal in these ranges: 14.5-16.5 kHz, 23.5-25.5 kHz and 30.5-32.5 kHz. Arcade monitors use 15 kHz, so this is most likely the reason the GBS8200 exists. Note that VGA monitors have a horizontal sync of 31.5 kHz, and the majority of VGA monitors, including a lot of multisync ones don't cater for this 15 kHz frequency prevalent with consoles. The table below shows what our old IBM PC video formats use, and why the GBS8200 won't work with them (note that in some cases cards will use a different V-SYNC (positive or negative) than the standard):

  MDA/Hercules CGA EGA Low-Res EGA Hi-Res
Max. Resolution 720 x 348 640 x 200 640 x 200 640 x 350
RGB Signals Digital Digital Digital Digital
Horizontal Frequency 18.432 kHz 15.75 kHz 15.75 kHz 21.85 kHz
Vertical Frequency 50 Hz 60 Hz 60 Hz 60 Hz
Sync Signal Separate H+V
Negative V-SYNC
Separate H+V
Positive V-SYNC
Separate H+V
Positive V-SYNC
Separate H+V
Negative V-SYNC
GBS8200 Supports? No
Need analog video signal
Horiz. freq out of range Incorrect sync
No
Need analog video signal
Incorrect sync
No
Need analog video signal
Incorrect sync
No
Need analog video signal
Horiz. freq out of range Incorrect sync

Note the missing MDA/Hercules and EGA frequency range that we need, and there is apparently no way to get the GBS8200 to scan outside of these three ranges. CGA and low-res EGA (200 lines) would be possible if we can convert the digital video signals to analogue and also combine the H+V sync signals into a single composite sync signal, but MDA, Hercules and high-resolution EGA fall outside the horizontal frequency range supported by the GBS8200.

 

Using the GBS8200 on a PC

Now for the good news: back in about 2020, Necroware designed a simple adapter that would take a CGA or EGA digital video (RGBHV) signal like those coming from old PC graphics cards, and convert them into an analogue RGBS signal that the GBS8200 expects. The adapter sits in between the video card and the GBS8200 video input, with the GBS8200's output connecting to your VGA monitor. Of course, you still need to find a multisync monitor that supports a 15 kHz horizontal sync frequency if you don't already own one.

Necroware got the idea of his converter from another YT content creator, TheRasteri. TheRasteri built a circuit using a simple resistor network to convert the digital signals to analog and also combine the horizontal and vertical sync signals into a composite sync signal. He then noticed that when using the GBS8200 with a CGA card, it doesn't support the intensity signal that CGA uses to provide the full colour palette. This means it's limited to 8 colours rather than the full 16 that are in the CGA palette. It was then updated with an EPROM that stored a map of the many combinations of digital video signals to analogue outputs, and this worked well, though perhaps not the most elegant design.

Necroware's MCE Adapter takes this design further to allow for more flexibility with selection jumpers for graphics modes and sync signals, as well as getting it working for MDA/Hercules cards. Both TheRasteri and Necroware's circuits do two things:

1) Converts the digital Red, Green and Blue signals from your MDA, CGA or EGA card into an analogue equivalent of 64-colour EGA. It does this by simply combining the various colour input signals to the 6 outputs of 64-colour EGA (Red, Green, Blue, Red with Intensity, Green with Intensity, and Blue with Intensity). It also includes IBM's "hack" they put into the design of their original IBM5153 Color Monitor to get CGA's unique brown colour - a feature that was lacking in numerous other CGA-compatible monitors at the time, resulting in an ugly dark yellow instead.
2) Combines the separate horizontal sync and vertical sync signals into one composite sync signal.

As Necroware pointed out in his findings, one potential issue with TheRasteri's approach was its use of an EPROM - the circuit might not be able to do screen refreshes fast enough given the speed of most EPROMs on the market - a 70ns one will be only just able to cope with hi-res EGA (which apparently does work with his adapter and the GBS8200, contrary to what I said earlier).

Necroware's answer to this was to use a PLD (Programmable Logic Device) instead. These run a lot faster than EPROMs, and are truly programmable for more flexibility, rather than just storing a very long list of conversions for the R,G,B,I values to analog. PLDs can be programmed with actual logic.


EPROMs (left) are only available in up to 70ns speed, PLDs (middle) can run as fast as 25ns,
FPGAs are faster and more powerful, but cost a lot more

Both TheRasteri's and Necroware's solutions are viable, but for my purposes this article is going to cover recreating Necroware's adapter. Once I've fully tested it, I will look at modifying the GBS8200 itself with additional circuitry and modifications to turn this cheap $20 converter board into something pretty decent. Please note that none of these are my findings or designs - there are numerous YT videos that show the shortcomings of the GBS8200 and things you can do to make it actually pretty incredible!

This project has three distinct stages, each of will produce faster and cleaner output in succession, but you can stop after any stage if parts cannot be acquired or your budget won't allow. Here are the stages we'll go through:

1) Build Necroware's MCE Adapter.
2) Circumvent the GBS8200's main processor completely with a better, more functional option with the use of GBS Control.
3) Add a clock generator for cleaner output.

All of these are not for the faint of heart, but equally you don't need to have a degree in electronics engineering - just some basic soldering skills, the means to write a program onto a chip, some spare time and about $50 for parts.

Head to Part 2, where I tackle the first part of the project, building Necroware's MCE Adapter.